<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>在线充值-{$tpshop_config['shop_info_store_title']}</title>
    <meta name="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
    <link rel="stylesheet" href="__STATIC__/css/myuser.css" type="text/css">
</head>

<body>
<!--------头部开始-------------->
<include file="Public/header" />
<include file="Public/topnav" />
<!--------头部结束-------------->

<div class="page_pad">
    <div class="page_margin">
        <div class="page_radius page_hidden">
            <div class="page_padin">
                <div class="user_page">
                    <div class="user_poi">当前位置：首页 &gt; <span>在线充值</span></div>
                    <div class="user_left">
                        <include file="User/userleft" />
                    </div><!--user_left-->

                    <div class="user_right">
                        <div class="order_page">
                            <form action="" method="post" onsubmit="return money_addcheck(this)">
                                <div class="uright_tabs">
                                    <ul>
                                        <li><a class="on" href="{:U('Home/User/my_money')}">在线充值</a></li>
                                        <li><a href="{:U('Home/User/money_addjl')}">充值记录</a></li>
                                        <div class="clear"></div>
                                    </ul>
                                </div><!--uright_tabs-->

                                <div class="money_add">
                                    <div class="fl"><div class="pad"><div class="h1">账户余额 <span>{$user_money}</span> 元</div></div></div>
                                    <div class="fr">
                                        <div class="h2">
                                            <table>
                                                <tr>
                                                    <td>充值金额</td>
                                                    <td><div class="ginput_div goods_mdiv_last"><input class="ginput" type="text" id="monet_num" name="monet_num"></div></td>
                                                    <td><button class="money_sub" type="submit">充值</button></td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="clear"></div>
                                </div><!--money_add-->

                                <div class="sellpad"><div class="seller_tit"><p>请选择充值方式</p></div></div>

                                <div class="po-re dsfzf-ee">
                                    <ul>
                                        <li>
                                            <div class="payment-area">
                                                <input type="radio" id="input-ALIPAY-1" value="pay_code=alipay" class="radio vam" name="pay_radio">
                                                <label for="">
                                                    <img src="/plugins/payment/alipay/logo.jpg" width="120" height="40" onclick="change_pay(this);">
                                                </label>
                                            </div>
                                        </li>
                                        <li>
                                            <div class="payment-area">
                                                <input type="radio" id="input-ALIPAY-1" value="pay_code=weixin" class="radio vam" name="pay_radio">
                                                <label for="">
                                                    <img src="/plugins/payment/weixin/logo.jpg" width="120" height="40" onclick="change_pay(this);">
                                                </label>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </form>
                        </div><!--order_page-->
                    </div><!--user_right-->
                    <div class="clear"></div>
                </div><!--user_page-->
            </div><!--page_padin-->
        </div><!--page_radius-->
    </div><!--page_margin-->
</div><!--page_pad-->

<script>
    function money_addcheck(o)
    {
        if(!o.monet_num.value)
        {
            layer.tips('金额数不能为空', '#monet_num', {tips: [1, '#f39800']});
            return false;
        }
        var re = /^[0-9]+.?[0-9]*/;//判断字符串是否为数字
        var nubmer = o.monet_num.value
        if(!re.test(nubmer))
        {
            layer.tips('请输入数字', '#monet_num', {tips: [1, '#f39800']});
            return false;
        }
    }

    $(document).ready(function(){
        $("input[name='pay_radio']").first().trigger('click');
    });
    // 切换支付方式
    function change_pay(obj)
    {
        $(obj).parent().siblings('input[name="pay_radio"]').trigger('click');
    }
</script>
<script src="__STATIC__/js/user_after.js"></script>

<!--------footer-开始-------------->
<include file="Public/footer" />
<!--------footer-结束-------------->

</body>
</html>